package com.example.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.entity.Result;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Component;

/**
 * @author 陈俊杰
 */
@Component
@Mapper
public interface AssessorResultDao extends BaseMapper<Result> {

    @Update("update result set final_result = #{s} where student_id = #{sid}")
    boolean updateBySid(String sid, String s);

    /**
     * 绿色通道
     * @param sid
     * @param is
     * @return
     */
    @Update("update result set first_trial_result = #{is},vote_result = #{is},intermediate_result=#{is} where id = #{sid}")
    boolean updateFirstBySid(String sid, String is);

    /**
     * 非绿色通道
     * @param sid
     * @param is
     * @return
     */
    @Update("update result set first_trial_result = #{is} where id = #{sid}")
    boolean updateNoBySid(String sid, String is);


}
